using octalforty.Brushie.Web.XmlRpc;

namespace octalforty.Syndication.Blogging.MetaWeblog
{
    /// <summary>
    /// Represents a Blogger- and MetaWeblog-compatible Blog.
    /// </summary>
    [XmlRpcStructure()]
    public class Blog
    {
        #region Private Member Variables
        private string id;
        private string name;
        private string url;
        #endregion

        #region Public Properties
        /// <summary>
        /// Gets or sets a string which contains the identifier of the <see cref="Blog"/>.
        /// </summary>
        [XmlRpcMember("blogid")]
        public string ID
        {
            get { return id; }
            set { id = value; }
        }

        /// <summary>
        /// Gets or sets a string which contains the name of the <see cref="Blog"/>.
        /// </summary>
        [XmlRpcMember("blogName")]
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        /// <summary>
        /// Gets or sets a string which contains the URL of the <see cref="Blog"/>.
        /// </summary>
        [XmlRpcMember("url")]
        public string Url
        {
            get { return url; }
            set { url = value; }
        }
        #endregion

        /// <summary>
        /// Initializes a new instance of <see cref="Blog"/> class.
        /// </summary>
        public Blog()
        {
        }

        /// <summary>
        /// Initializes a new instance of <see cref="Blog"/> class.
        /// </summary>
        /// <param name="id"></param>
        /// <param name="name"></param>
        /// <param name="url"></param>
        public Blog(string id, string name, string url)
        {
            this.id = id;
            this.name = name;
            this.url = url;
        }
    }
}
